package aaa.main;

import greendroid.app.GDActivity;
import aaa.database.Database;
import aaa.screen.WelcomeScreen;
import android.content.Intent;
import android.os.Bundle;

/**
 * Entry point for the application.
 * 
 * <p>This view should never be seen by the user. IT serves as an auxiliary 
 * for other processes.
 * 
 * @author 		Schnell Michäel, Zanette Sébastien
 */
public class MainActivity extends GDActivity {
	
	/**
	 * Unique instance of this class.
	 */
	private static MainActivity instance = null ;

	/**
	 * Returns the unique instance of this class.
	 * 
	 * @return	Unique instance of this class
	 */
	public static MainActivity getInstance () {
		return MainActivity.instance ;
	}// getInstance()

	/**
	 * Redirect the user to the first view of the application.
	 */
	@Override
	public void onCreate(Bundle savedInstanceState) {
//		//TODO
//		Toast.makeText(this, "Debug du trace.", Toast.LENGTH_SHORT).show() ;
//		Debug.startAllocCounting() ;
		super.onCreate(savedInstanceState) ;
		if (MainActivity.instance == null) {
			MainActivity.instance = this ;
		}// if
		this.startActivity(new Intent(this, WelcomeScreen.class)) ;
	}// onCreate(Bundle)

}// class MainActivity